
This resource address returns the current state of modifiable properties of the specified host.
| URL Parameters | |
|---|---|
| format | The format of the returned data. Can be either
json or xml (default). If present, the format
parameter overrides the Accept header. |
| Response Headers | |
|---|---|
| Content-type | The MIME type of the data in the response
body. Depending upon the value of the format parameter or Accept header, one of
application/xml, application/json. |
Upon success, MarkLogic Server returns status code 200 (OK), and the response body contains the requested information. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.
manage-user role, or the following
privilege: http://marklogic.com/xdmp/privileges/manage
The structure of the output returned from this REST API is as follows:
dynamic-hosthost-namegroupbind-portforeign-bind-portzonebootstrap-hosthost-modehost-mode-description
$ curl --anyauth --user user:password -X GET -i \
http://localhost:8002/manage/v2/hosts/my-host/properties
HTTP/1.1 200 OK
Content-type: application/xml
Cache-Control: no-cache
Expires: -1
Server: MarkLogic
Content-Length: 356
Connection: Keep-Alive
Keep-Alive: timeout=5
<host-properties
xsi:schemaLocation="http://marklogic.com/manage manage.xsd"
xmlns="http://marklogic.com/manage"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<host-name>my-host</host-name>
<group>16709278353323551294</group>
<bind-port>7999</bind-port>
<foreign-bind-port>7998</foreign-bind-port>
<zone/>
</host-properties>
The equivalent JSON output is shown below:
{
"host-name": "my-host",
"group": "16709278353323551294",
"bind-port": 7999,
"foreign-bind-port": 7998,
"zone":""
}